package main.entity;

import java.io.Serializable;
import java.sql.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.validation.constraints.Past;

import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.stereotype.Component;

@Component
@Entity(name="vote")
public class VoteVO extends BaseVO {
	/**
	 * 2016-10-24-pm
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "vote_ID", unique = true, nullable = true)
	private Integer voteID;
	@NotEmpty
	@Column(name="vote_name", unique=true, nullable = true, length=64)
	private String voteName;
	@Column(name="chnl_ID", nullable = true)
	private Integer channelID;
	@Past
	@Column(name="create_time")
	private Date crTime;
	@Column(name="hasVoted")
	private String hasVotedUsers;//add create user
	
	public Integer getVoteID() {
		return voteID;
	}
	public void setVoteID(Integer voteID) {
		this.voteID = voteID;
	}
	public String getVoteName() {
		return voteName;
	}
	public void setVoteName(String voteName) {
		this.voteName = voteName;
	}
	public Integer getChannelID() {
		return channelID;
	}
	public void setChannelID(Integer channelID) {
		this.channelID = channelID;
	}
	public Date getCrTime() {
		return crTime;
	}
	public void setCrTime(Date crTime) {
		this.crTime = crTime;
	}
	public String getHasVotedUsers() {
		return hasVotedUsers;
	}
	public void setHasVotedUsers(String hasVotedUsers) {
		this.hasVotedUsers = hasVotedUsers;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
}
